package adv329;

import java.util.Date;

/**
 * @author oldliu
 * @since 1.0
 */
public class DateTest {
    public static void main(String[] args) {
        Date d=new Date();//现在的时刻
        System.out.println(d);
        long time = d.getTime();
        System.out.println(time);//1970到现在的毫秒数
        System.out.println(System.currentTimeMillis());
        System.out.println("年："+d.getYear());
        System.out.println("月："+d.getMonth());
    }
}
